﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Swork03_28.Domain.TraceableInfos
{
    /// <summary>
    /// 商品表
    /// </summary>
    public class GoodsInfo
    {
        [Key]
        public int Id { get; set; }

        [StringLength(100)]
        public string? Name { get; set; }

        [StringLength(1000)]
        public string? Imgs { get; set; }

        [StringLength(50)]
        public string? CreatePeople { get; set; }

        public DateTime CreateTime { get; set; }

        [StringLength(50)]
        public string? UpdateePeople { get; set; }

        public DateTime? UpdateTime { get; set; }

        public bool IsDel { get; set; }
    }

    /// <summary>
    /// 溯源表
    /// </summary>
    [Table("Traceables")]
    public class Traceables
    {
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 商品编号
        /// </summary>
        public int Gid { get; set; }

        /// <summary>
        /// 商品图片
        /// </summary>
        [StringLength(500)]
        public string? Images { get; set; }

        /// <summary>
        /// 检测报告图片
        /// </summary>
        [StringLength(1000)]
        public string? TestImgs { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        [StringLength(100)]
        public string? Batch { get; set; }

        /// <summary>
        /// 保质期
        /// </summary>
        public int Shelflife { get; set; }

        /// <summary>
        /// 生产许可编号
        /// </summary>
        [StringLength(100)]
        public string? Number { get; set; }

        /// <summary>
        /// 生产企业
        /// </summary>
        [StringLength(100)]
        public string? ProduceEnterprise { get; set; }


        [StringLength(50)]
        public string? CreatePeople { get; set; }

        public DateTime CreateTime { get; set; }

        [StringLength(50)]
        public string? UpdateePeople { get; set; }

        public DateTime? UpdateTime { get; set; }

        public bool IsDel { get; set; }
    }

    /// <summary>
    /// 养殖信息表
    /// </summary>
    public class Farmed
    {
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 品种
        /// </summary>
        [StringLength(100)]
        public string? Breed { get; set; }

        /// <summary>
        /// 来源
        /// </summary>
        [StringLength(100)]
        public string? Source { get; set; }

        /// <summary>
        /// 饲养天数
        /// </summary>
        public int Feeding { get; set; }

        /// <summary>
        /// 饲料品牌
        /// </summary>
        [StringLength(100)]
        public string? Brand { get; set; }

        /// <summary>
        /// 饲养负责人
        /// </summary>
        [StringLength(100)]
        public string? Principal { get; set; }

        /// <summary>
        /// 出栏日期
        /// </summary>
        public DateTime? PublicationDate { get; set; }

        /// <summary>
        /// 动检证
        /// </summary>
        public string? Certificate { get; set; }

        /// <summary>
        /// 养殖场编号
        /// </summary>
        public int FarmId { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string? BatchId { get; set; }
    }
}
